//
//  SmallTableViewCell.m
//  小胖兔旅行指南
//
//  Created by LY on 15/4/20.
//  Copyright (c) 2015年 小胖兔. All rights reserved.
//

#import "SmallTableViewCell.h"

@implementation SmallTableViewCell

-(void)dealloc
{
    
    
    [super dealloc];
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        UIView *cellView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, 100)] autorelease];
        [self.contentView addSubview:cellView];
        
        self.dImage = [[[UIImageView alloc] initWithFrame:CGRectMake(0, 5, cellView.frame.size.width / 2 - 2.5, cellView.frame.size.height - 10)] autorelease];
        self.dButton = [[[UIButton alloc] initWithFrame:CGRectMake(0, 0, _dImage.frame.size.width, _dImage.frame.size.height)] autorelease];
        self.dLable = [[[UILabel alloc] initWithFrame:CGRectMake(0, 0, _dImage.frame.size.width, _dImage.frame.size.height)] autorelease];
        [cellView addSubview:_dImage];
        [_dImage addSubview:_dLable];
        [_dLable addSubview:_dButton];
        _dImage.userInteractionEnabled = YES;
        _dLable.userInteractionEnabled = YES;
        [_dLable setTextAlignment:NSTextAlignmentCenter];
        [_dLable setTextColor:[UIColor whiteColor]];
        [_dLable setFont:[UIFont systemFontOfSize:20.0]];
        
        
        
        self.eImage = [[[UIImageView alloc] initWithFrame:CGRectMake(_dImage.frame.size.width + 5, 5, _dImage.frame.size.width, _dImage.frame.size.height)] autorelease];
        self.eButton = [[[UIButton alloc] initWithFrame:CGRectMake(0, 0, _eImage.frame.size.width, _eImage.frame.size.height)] autorelease];
        self.eLable = [[[UILabel alloc] initWithFrame:CGRectMake(0, 0, _eImage.frame.size.width, _eImage.frame.size.height)] autorelease];
        [cellView addSubview:_eImage];
        [_eImage addSubview:_eLable];
        [_eLable addSubview:_eButton];
        _eImage.userInteractionEnabled = YES;
        _eLable.userInteractionEnabled = YES;
        [_eLable setTextAlignment:NSTextAlignmentCenter];
        [_eLable setTextColor:[UIColor whiteColor]];
        [_eLable setFont:[UIFont systemFontOfSize:20.0]];

    }
    return self;
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
